//新添加子页面的div名字
var divm = "";	  
//触发新页面动作
var index_subhtml = "";
//新页面随机码
var random_subhtml = "";
//回调函数
var call_vue_funcName = "";
//页面按钮禁用权限
var T00000_N01_GHT003 = {};
//跳转子页面
var sub_vue = "";

(function($) {
	$.each(['show','hide'], function(i, val) {
        var _org = $.fn[val];
        $.fn[val] = function() {
            this.trigger(val);
            return _org.apply(this, arguments);
        };
    });
})(jQuery);

//var iS = 3600;
////定时器
//setInterval(function(){
//	$("#N0001_SetTime").html("倒计时发送指令:<font color='red'>"+iS.toString()+"</font>");
//	iS = iS - 1;
//	if(iS < 0)
//		iS = 3600;
//},1000);
/**************websocket定义开始****************/
var wSck = null;
if(contextPath == "")
	wSck = new WebSocket("ws://"+host+"/websockets")
else
	wSck = new WebSocket("ws://"+host+"/"+contextPath+"/websockets")
	
wSck.onopen = function (evt) {
    if (wSck.readyState === 1) {
    	wSck.send('##001##');
    }
    //console.log("opened "+evt.toString());
};

wSck.onclose = function (evt) {
    //console.log("closed "+evt.toString());
};

wSck.onmessage = function (evt) {
	//layer.close(ly_index);
	//接收到的后台程序数据，json格式
//	if(evt.data.toString() == "发送websocket数据到页面==>")
//		alert(evt.data.toString());
    var jso = JSON.parse(evt.data);
    if(jso.hasOwnProperty("N01_NG40J5") && jso["N01_NG40J5"].length > 0){
    	var temHtml = s_decode(jso["N01_NG40J5"][0]["URL_PATH"]);
    	var temRandom = s_decode(jso["N01_NG40J5"][0]["URL_RANDOM"]);
    	//调用或加载左侧菜单并click
    	Add_No_Show_Menu(temHtml,temRandom,JSON.parse("{}"));
    	//弹窗页面
//    	T00000_open_win(temHtml,temRandom);
    }
    if(jso.hasOwnProperty("N01_CMDDOW") && jso["N01_CMDDOW"].length > 0){
    	var temCMD_NAME = s_decode(jso["N01_CMDDOW"][0]["CMD_NAME"]);
    	var temDEVICE_NAME = s_decode(jso["N01_CMDDOW"][0]["DEVICE_NAME"]);
    	var temGET_TIME = s_decode(jso["N01_CMDDOW"][0]["GET_TIME"]);
    	
    	$("#N0001_Show").html("<font color='red'>人工发送指令操作成功:"+temCMD_NAME+"=>"+temDEVICE_NAME+"指令时间=>"+temGET_TIME+"</font>");
    	iS = 3600;
//	    swal("人工发送指令操作成功!",temDEVICE_NAME+",发送指令:"+temCMD_NAME, "success");
    }
    if(jso.hasOwnProperty("N01_CMD_INTERVAL") && jso["N01_CMD_INTERVAL"].length > 0){
    	var temCMD_NAME = s_decode(jso["N01_CMD_INTERVAL"][0]["CMD_NAME"]);
    	var temDEVICE_NAME = s_decode(jso["N01_CMD_INTERVAL"][0]["DEVICE_NAME"]);
    	var temGET_TIME = s_decode(jso["N01_CMD_INTERVAL"][0]["GET_TIME"]);
    	$("#N0001_Show").html("<font color='red'>定时器自动发送指令操作成功:"+temCMD_NAME+"=>"+temDEVICE_NAME+"=>指令时间=>"+temGET_TIME+"</font>");
    	iS = 3600;
//	    swal("定时器自动发送指令操作成功!",temDEVICE_NAME+",发送指令:"+temCMD_NAME, "success");
    }
    if(jso.hasOwnProperty("STATION_STATE")){
    	$("#N0002_STATION_COUNT").html(jso["STATION_STATE"].length.toString());
    	$("#N0002_STATION_STATE").html("");
    	$.each(jso["STATION_STATE"], function (jindex, obj2) {
    		var ONLINE_STATE = "";
    		if(obj2["ONLINE_STATE"] == "1")
    			ONLINE_STATE = s_decode(obj2["STATION_NAME"])+"("+s_decode(obj2["STATION_IP"])+")"+"<font color='blue'>在线</font>";
    		else
    			ONLINE_STATE = s_decode(obj2["STATION_NAME"])+"("+s_decode(obj2["STATION_IP"])+")"+"<font color='red'>离线</font>";
    			
    		var div_s = "<div class=\"left\">"
	                  +"	<div class=\"author-name\">"
	                  +"		<small class=\"chat-date\">"
	                  +"		</small>"
	                  +"	</div>"
	                  +"	<div class=\"chat-message active\">"+ONLINE_STATE
	                  +"	</div>"
	                  +"</div>";
    		$("#N0002_STATION_STATE").append(div_s);
    	});
    }
    if(jso.hasOwnProperty("h_device_status_overview")){
    	var h_device_status_overview = jso["h_device_status_overview"];
    	var h_device_status_overview_station_code_count = {};
    	$.each(h_device_status_overview, function (jindex, obj2) {
			obj2["NETWORK_STATUS"] = "0";
			if(s_decode(obj2["GET_TIME"]) != "" &&  new Date(s_decode(obj2["GET_TIME"])) >= new Date(new Date().setHours(new Date().getHours()-1)).getTime()){
				obj2["NETWORK_STATUS"] = "1";
			}
    		var A661EC_station_code_div_array = $("#A661EC_h_device_status_overview_main").find(".A661EC_station_code");
    		var A661EC_DEVICE_CODE_HTML = "<span>"+s_decode(obj2["DEVICE_CODE"])+"</span>";
    		var A661EC_DEVICE_TYPE_HTML = "<span>"+s_decode(obj2["DEVICE_TYPE"])+"</span>";
    		var A661EC_DEVICE_NAME_HTML = "<span>"+s_decode(obj2["DEVICE_NAME"])+"</span>";
    		var A661EC_DEVICE_ADDRESS_HTML = "<span>"+s_decode(obj2["DEVICE_ADDRESS"])+"</span>";
    		var A661EC_NETWORK_CODE_HTML = "<span>"+s_decode(obj2["NETWORK_CODE"])+"</span>";
    		var A661EC_CURRENT_STATUS_HTML = "<span>"+s_decode(obj2["CURRENT_STATUS"])+"</span>";
			var A661EC_CURRENT_TASK_HTML = "<span>"+s_decode(obj2["CURRENT_TASK"])+"</span>";
			var A661EC_NETWORK_STATUS_HTML = "<span>"+s_decode(obj2["NETWORK_STATUS"])+"</span>";
			var A661EC_GET_TIME_HTML = "<span>"+s_decode(obj2["GET_TIME"])+"</span>";
			if(s_decode(obj2["NETWORK_STATUS"]) != "1"){
				A661EC_CURRENT_STATUS_HTML = "<span style=\"color:red;\">未知</span>";
			}
			else{
				if(s_decode(obj2["CURRENT_STATUS"]) == ""){
					A661EC_CURRENT_STATUS_HTML = "<span style=\"color:red;\">未知</span>";
				}
				else if(s_decode(obj2["CURRENT_STATUS"]) == "0"){
					A661EC_CURRENT_STATUS_HTML = "<span style=\"color:green;\">待机</span>";
				}
				else if(s_decode(obj2["CURRENT_STATUS"]) == "1"){
					A661EC_CURRENT_STATUS_HTML = "<span style=\"color:orange;\">测在线</span>";
				}
				else if(s_decode(obj2["CURRENT_STATUS"]) == "2"){
					A661EC_CURRENT_STATUS_HTML = "<span style=\"color:orange;\">标定</span>";
				}
				else if(s_decode(obj2["CURRENT_STATUS"]) == "3"){
					A661EC_CURRENT_STATUS_HTML = "<span style=\"color:orange;\">停机</span>";
				}
				else if(s_decode(obj2["CURRENT_STATUS"]) == "4"){
					A661EC_CURRENT_STATUS_HTML = "<span style=\"color:orange;\">维护</span>";
				}
				else if(s_decode(obj2["CURRENT_STATUS"]) == "5"){
					A661EC_CURRENT_STATUS_HTML = "<span style=\"color:orange;\">测实样</span>";
				}
				else if(s_decode(obj2["CURRENT_STATUS"]) == "6"){
					A661EC_CURRENT_STATUS_HTML = "<span style=\"color:orange;\">测质控</span>";
				}
				else if(s_decode(obj2["CURRENT_STATUS"]) == "7"){
					A661EC_CURRENT_STATUS_HTML = "<span style=\"color:orange;\">测标液</span>";
				}
				else if(s_decode(obj2["CURRENT_STATUS"]) == "8"){
					A661EC_CURRENT_STATUS_HTML = "<span style=\"color:orange;\">测离线</span>";
				}
			}
			if(s_decode(obj2["CURRENT_TASK"]) == ""){
				A661EC_CURRENT_TASK_HTML = "<span style=\"color:red;\">未知/无任务</span>";
			}
			else if(s_decode(obj2["CURRENT_TASK"]) == "1"){
				A661EC_CURRENT_TASK_HTML = "<span style=\"color:orange;\">量程校准</span>";
			}
			else if(s_decode(obj2["CURRENT_TASK"]) == "2"){
				A661EC_CURRENT_TASK_HTML = "<span style=\"color:orange;\">启动做样</span>";
			}
			else if(s_decode(obj2["CURRENT_TASK"]) == "3"){
				A661EC_CURRENT_TASK_HTML = "<span style=\"color:orange;\">重复性</span>";
			}
			else if(s_decode(obj2["CURRENT_TASK"]) == "4"){
				A661EC_CURRENT_TASK_HTML = "<span style=\"color:orange;\">示值误差</span>";
			}
			else if(s_decode(obj2["CURRENT_TASK"]) == "5"){
				A661EC_CURRENT_TASK_HTML = "<span style=\"color:orange;\">24H低浓度漂移</span>";
			}
			else if(s_decode(obj2["CURRENT_TASK"]) == "6"){
				A661EC_CURRENT_TASK_HTML = "<span style=\"color:orange;\">24H高浓度量程</span>";
			}
			else if(s_decode(obj2["CURRENT_TASK"]) == "7"){
				A661EC_CURRENT_TASK_HTML = "<span style=\"color:orange;\">定量下限</span>";
			}
			else if(s_decode(obj2["CURRENT_TASK"]) == "8"){
				A661EC_CURRENT_TASK_HTML = "<span style=\"color:orange;\">精密度</span>";
			}
			else if(s_decode(obj2["CURRENT_TASK"]) == "9"){
				A661EC_CURRENT_TASK_HTML = "<span style=\"color:orange;\">零点漂移</span>";
			}
			else if(s_decode(obj2["CURRENT_TASK"]) == "10"){
				A661EC_CURRENT_TASK_HTML = "<span style=\"color:orange;\">量程漂移</span>";
			}
			else if(s_decode(obj2["CURRENT_TASK"]) == "11"){
				A661EC_CURRENT_TASK_HTML = "<span style=\"color:orange;\">直线性</span>";
			}
			else if(s_decode(obj2["CURRENT_TASK"]) == "12"){
				A661EC_CURRENT_TASK_HTML = "<span style=\"color:orange;\">量程漂移-零漂前</span>";
			}
			else if(s_decode(obj2["CURRENT_TASK"]) == "13"){
				A661EC_CURRENT_TASK_HTML = "<span style=\"color:orange;\">量程漂移-零漂后</span>";
			}
			else if(s_decode(obj2["CURRENT_TASK"]) == "14"){
				A661EC_CURRENT_TASK_HTML = "<span style=\"color:orange;\">仪器标定</span>";
			}
			if(s_decode(obj2["NETWORK_STATUS"]) == ""){
				A661EC_NETWORK_STATUS_HTML = "<span style=\"color:red;\">未知</span>";
			}
			else if(s_decode(obj2["NETWORK_STATUS"]) == "0"){
				A661EC_NETWORK_STATUS_HTML = "<span style=\"color:red;\">断线</span>";
			}
			else if(s_decode(obj2["NETWORK_STATUS"]) == "1"){
				A661EC_NETWORK_STATUS_HTML = "<span style=\"color:green;\">在线</span>";
			}
    		var has_A661EC_station_code_div = 0;
    		for(let i=0;i<A661EC_station_code_div_array.length;i++){
    			if($($("#A661EC_h_device_status_overview_main").find(".A661EC_station_code")[i]).attr("value")==obj2["STATION_CODE"]){
    				has_A661EC_station_code_div = 1;
    			}
    		}
    		if(has_A661EC_station_code_div == 0){
    			var A661EC_station_code_div_html = "<div value=\""+obj2["STATION_CODE"]+"\" class=\"col-sm-12 A661EC_station_code\">"+
    												"<h3><strong>"+s_decode(obj2["STATION_NAME"])+"</strong></h3>"+
    												"</div>"
    			$("#A661EC_h_device_status_overview_main").append(A661EC_station_code_div_html);
    			h_device_status_overview_station_code_count[obj2["STATION_CODE"]] = 0;
    		}
    		A661EC_station_code_div_array = $("#A661EC_h_device_status_overview_main").find(".A661EC_station_code");
    		var A661EC_device_code_div_array = $("#A661EC_h_device_status_overview_main").find(".A661EC_device_code");
    		var has_A661EC_device_code_div = 0;
    		for(let i=0;i<A661EC_device_code_div_array.length;i++){
    			if($($("#A661EC_h_device_status_overview_main").find(".A661EC_device_code")[i]).attr("value")==obj2["DEVICE_CODE"]){
    				has_A661EC_device_code_div = 1;
    			}
    		}
    		if(has_A661EC_device_code_div == 0){
    			var A661EC_device_code_div_html= "<div value=\""+obj2["DEVICE_CODE"]+"\" class=\"col-sm-2 A661EC_device_code\">"+
		            "<div class=\"contact-box\">"+
	                  "<h3><strong>设备编号:</strong><strong id=\"DEVICE_CODE\">"+A661EC_DEVICE_CODE_HTML+"</strong></h3>"+
	                  "<h3><strong>设备类型:</strong><strong id=\"DEVICE_TYPE\">"+A661EC_DEVICE_TYPE_HTML+"</strong></h3>"+
	                  "<h3><strong>设备名称:</strong><strong id=\"DEVICE_NAME\">"+A661EC_DEVICE_NAME_HTML+"</strong></h3>"+
	                  "<h3><strong>设备地址:</strong><strong id=\"DEVICE_ADDRESS\">"+A661EC_DEVICE_ADDRESS_HTML+"</strong></h3>"+
	                  "<h3><strong>网络编号:</strong><strong id=\"NETWORK_CODE\">"+A661EC_NETWORK_CODE_HTML+"</strong></h3>"+
	                  "<h3><strong>当前状态:</strong><strong id=\"CURRENT_STATUS\" value=\""+obj2["CURRENT_STATUS"]+"\">"+A661EC_CURRENT_STATUS_HTML+"</strong></h3>"+
	                  "<h3><strong>当前任务:</strong><strong id=\"CURRENT_TASK\" value=\""+obj2["CURRENT_TASK"]+"\">"+A661EC_CURRENT_TASK_HTML+"</strong></h3>"+
	                  "<h3><strong>联网状态:</strong><strong id=\"NETWORK_STATUS\" value=\""+obj2["NETWORK_STATUS"]+"\">"+A661EC_NETWORK_STATUS_HTML+"</strong></h3>"+
	                  "<h3><strong>当前时间:</strong><strong id=\"GET_TIME\" value=\""+obj2["GET_TIME"]+"\">"+A661EC_GET_TIME_HTML+"</strong></h3>"+
	                  "<p style=\"text-align: center;\">"+
	                  "<button type=\"button\" class=\"btn btn-w-m btn-primary\" onclick=\"A661EC_detail('"+obj2["STATION_CODE"]+"','"+obj2["STATION_NAME"]+"','"+obj2["DEVICE_CODE"]+"','"+obj2["DEVICE_TYPE"]+"','"+obj2["DEVICE_NAME"]+"','"+obj2["DEVICE_ADDRESS"]+"','"+obj2["NETWORK_CODE"]+"')\">查看详情</button>"+
	                  "</p>"+
	                  "<p style=\"text-align: center;\">"+
	                  "<button type=\"button\" class=\"btn btn-w-m btn-primary\" onclick=\"A661EC_report()\">生成报告</button>"+
	                  "</p>"+
		            "</div>"+
		        "</div>";
    			for(let i=0;i<A661EC_station_code_div_array.length;i++){
        			if($($("#A661EC_h_device_status_overview_main").find(".A661EC_station_code")[i]).attr("value")==obj2["STATION_CODE"]){
        				if(h_device_status_overview_station_code_count[obj2["STATION_CODE"]] % 6 ==0){
        					$($("#A661EC_h_device_status_overview_main").find(".A661EC_station_code")[i]).append("<div class=\"row\"></div>");
        				}
        				$($($($("#A661EC_h_device_status_overview_main").find(".A661EC_station_code")[i])).find(".row")[Math.floor(h_device_status_overview_station_code_count[obj2["STATION_CODE"]]/6)]).append(A661EC_device_code_div_html);
        				h_device_status_overview_station_code_count[obj2["STATION_CODE"]] ++;
        			}
        		}
    		}
    		else{
    			for(let i=0;i<A661EC_station_code_div_array.length;i++){
        			if($($("#A661EC_h_device_status_overview_main").find(".A661EC_station_code")[i]).attr("value")==obj2["STATION_CODE"]){
        				var A661EC_sub_device_code_div_array = $($("#A661EC_h_device_status_overview_main").find(".A661EC_station_code")[i]).find(".A661EC_device_code");
        				for(let j=0;j<A661EC_sub_device_code_div_array.length;j++){
        	    			if($(A661EC_sub_device_code_div_array[j]).attr("value")==obj2["DEVICE_CODE"]){
        	    				$(A661EC_sub_device_code_div_array[j]).find("#CURRENT_STATUS").html(A661EC_CURRENT_STATUS_HTML);
                				$(A661EC_sub_device_code_div_array[j]).find("#CURRENT_TASK").html(A661EC_CURRENT_TASK_HTML);
                				$(A661EC_sub_device_code_div_array[j]).find("#NETWORK_STATUS").html(A661EC_NETWORK_STATUS_HTML);
                				$(A661EC_sub_device_code_div_array[j]).find("#GET_TIME").html(A661EC_GET_TIME_HTML);
                				$(A661EC_sub_device_code_div_array[j]).find("#CURRENT_STATUS").attr("value",obj2["CURRENT_STATUS"]);
                				$(A661EC_sub_device_code_div_array[j]).find("#CURRENT_TASK").attr("value",obj2["CURRENT_TASK"]);
                				$(A661EC_sub_device_code_div_array[j]).find("#NETWORK_STATUS").attr("value",obj2["NETWORK_STATUS"]);
                				$(A661EC_sub_device_code_div_array[j]).find("#GET_TIME").attr("value",obj2["#GET_TIME"]);
        	    			}
        	    		}
        			}
        		}
    		}

    		if($("#A661ED_h_device_detail").find("#A661ED_DEVICE_CODE").text()==obj2["DEVICE_CODE"] &&
    			$("#A661ED_h_device_detail").find("#A661ED_STATION_CODE").text()==obj2["STATION_CODE"]){
    			$("#A661ED_h_device_detail").find("#A661ED_CURRENT_STATUS").html(A661EC_CURRENT_STATUS_HTML);
    			$("#A661ED_h_device_detail").find("#A661ED_CURRENT_TASK").html(A661EC_CURRENT_TASK_HTML);
    			$("#A661ED_h_device_detail").find("#A661ED_NETWORK_STATUS").html(A661EC_NETWORK_STATUS_HTML);
    			$("#A661ED_h_device_detail").find("#A661ED_GET_TIME").html(A661EC_GET_TIME_HTML);    		}
    		if($("#AD9368_find_DEVICE_CODE").val()==obj2["DEVICE_CODE"] &&
    				$("#AD9368_find_STATION_CODE").val()==obj2["STATION_CODE"]){
    			var AD9368_device_status_div_list = $("[id^='AD9368_device_status_div_']");
    			for(let k=0;k<AD9368_device_status_div_list.length;k++){
    				var kk = k;
    				if (k<10){
    					kk = "0"+k;
    				}
    				else{
    					kk = k;
    				}
        			if(obj2["htCoilStatus_VAL_"+kk] == "1"){
        				if(k != 1){
        					$(AD9368_device_status_div_list[k]).css("background-color","rgba(0,255,0,1)");
        				}
        				else{
        					$(AD9368_device_status_div_list[k]).css("background-color","rgba(255,0,0,1)");
        				}
        			}
        			else{
        				if(k != 1){
        					$(AD9368_device_status_div_list[k]).css("background-color","rgba(255,0,0,1)");
        				}
        				else{
        					$(AD9368_device_status_div_list[k]).css("background-color","rgba(0,255,0,1)");
        				}
        			}
    			}
    		}
    	});
    	//console.log(h_device_status_overview);
    }
    else{
	    var Msg = evt.data;
//	    swal("收到操作成功!",Msg, "success");
    }
};

wSck.onerror = function(evt){
//    console.log("error "+evt.toString());
}
/**************websocket定义结束****************/
//打开弹窗页面
function T00000_open_win(temindex_subhtml,teminput_random){
	index_subhtml = s_decode(temindex_subhtml);
	random_subhtml = s_decode(teminput_random);
	//本页面传到其他页面参数
	if(loadHtmlSubVueFun(index_subhtml,"index_call_vue_layer") == true){
		var n = Get_RandomDiv(random_subhtml,"");
		layer.open({
			type: 1,
			area: ['1100px', '600px'],
			fixed: false, //不固定
			maxmin: true,
			content: $(n),
			success: function(layero, index){
				var T00000_toparam = {};
				T00000_toparam["ly_index"] = index;
				eval(random_subhtml+"_param = {}");
				for(var key in T00000_toparam)
					eval(inputrandom+"_param['"+key+"'] = '"+T00000_toparam[key]+"'");
				//参数传递并赋值
				eval(random_subhtml+"_param_set()");
				var tbName = "";
				if(index_subhtml.indexOf("/") == -1)
					tbName = index_subhtml.substring(0,index_subhtml.indexOf(".vue"));
				else
					tbName = index_subhtml.substring(index_subhtml.lastIndexOf("/")+1,index_subhtml.indexOf(".vue"));
				eval(random_subhtml+"_init_"+tbName+"()");
			},
			end: function(){
				$(n).hide();
			}
		});	
	}
}

//弹窗vue回调
function index_call_vue_layer(objResult){
	var index_suburl = index_subhtml.substring(0,index_subhtml.lastIndexOf(".vue"));
	var index_subname = index_suburl.substring(index_subhtml.lastIndexOf("/")+1,index_suburl.length);
	var n = Get_RandomDiv(random_subhtml,objResult);	
	layer.open({
		type: 1,
        area: ['1100px', '600px'],
        fixed: false, //不固定
        maxmin: true,
        content: $(n),
        success: function(layero, index){
        	var T00000_toparam = {};
        	T00000_toparam["ly_index"] = index;	
        	loadScript_hasparam(index_suburl+".js",random_subhtml+"_"+index_subname+"_biz_start",T00000_toparam);
    		//全局变量传递页面参数重置
    		Temp_toparam = {};
        },
		end: function(){
			$(n).hide();
		}
    });
}

//空函数
function T00000_init_biz_start(input){
}

//仅获取子页div不创建
function Get_RDivNoBuild(temRandom,objResult){
	return "#"+temRandom +"_div";
}

//获取子页div，没有则创建并返回
function Get_RandomDiv(temRandom,objResult){
	var divIndex = temRandom+"_div";
	if($("#"+temRandom +"_div").length > 0)
		return "#"+temRandom +"_div";
	else{
		var nn = "<div id='" + divIndex + "' name='" + divIndex + "'></div>";
		$(".J_mainContent").append(nn);
		$("#"+divIndex).append(objResult);
		return "#"+divIndex;
	}
}

//业务逻辑数据开始
function biz_start() {
	layer.close(ly_index);
	
    /*biz begin*/
	
	index_biz_start();	
    /*biz end*/
}

function index_biz_start(){
	var menu_cont_Random = s_decode(getUrlParam("sub_Random"));
	if(sub_vue == "mac_info/view_mp4.vue")
		menu_cont_Random = "A66FTT";
	//菜单加载
	$("#iframe0").hide();
	var nn = "<div id='"+menu_cont_Random+"_div' name='"+menu_cont_Random+"_div'></div>";
	$(".J_mainContent").append(nn);
	$(".J_mainContent").show();
	index_subhtml = s_decode(sub_vue);
	divm = menu_cont_Random+"_div";
	random_subhtml = menu_cont_Random+"_";
	index_subhtml = sub_vue;
	call_vue_funcName = "index_call_vue";

	var ahref = window.document.location.pathname.replace("/","")
	var temRoute = {"p_url":ahref,"c_url":sub_vue};
	var htmlSetHasSub = false;
	$.each(htmlRoute, function (i, obj) {
		if(CompareJsonObj(obj,temRoute) == true){
			htmlSetHasSub = true;
		}
	});
	loadScript_nofun(index_subhtml+"?callback=ReadCommonRes");
}

//vue回调
function index_call_vue(objResult){
	if(index_subhtml == "xxx$TTT.vue"){
	}
	//其他事件触发
	else
	{
		//前端加载子页面div
		$("#"+divm).append(objResult);
		
		var index_suburl = index_subhtml.substring(0,index_subhtml.lastIndexOf(".vue"));
		var index_subname = index_suburl.substring(index_subhtml.lastIndexOf("/")+1,index_suburl.length);
		loadScript_hasparam(index_suburl+".js",random_subhtml+index_subname+"_biz_start",Temp_toparam);
		//全局变量传递页面参数重置
		Temp_toparam = {};
	}
}

//页面按钮权限设置
function page_btn_priv(temDivRan){
	var n = Get_RandomDiv(temDivRan,"");
	var buttons = $(n).find('button');
	$.each(T00000_N01_GHT003, function (i, objAry) {
		$.each(buttons, function (i, objSub) {
			if(objSub.id != "" && objSub.id == objAry.BTN_EN_NAME){
				$(objSub).hide();
			}
		});
	});
}

$(document).ready(function () {
	sub_vue = s_decode(getUrlParam("sub_vue"));
	if(getUrlParam("nologin") == "1")
		biz_start();
	else
		init_page();
});